package com.xquant.common.engine.xPP.request.instrument;

import com.xquant.common.engine.xPP.request.Instrument;
import com.xquant.common.engine.xPP.request.scene.Factor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author B946
 * @date 29/09/2020 10:05
 * @description:
 */
public class SceneInstrument{

    private Instrument instrument;

    private List<Factor> factors;

    public SceneInstrument(Instrument instrument) {
        this.instrument = instrument;
        this.factors = factors;
    }

    public Instrument getInstrument() {
        return instrument;
    }

    public void setInstrument(Instrument instrument) {
        this.instrument = instrument;
    }

    public List<Factor> getFactors() {
        return factors;
    }

    public void setFactors(List<Factor> factors) {
        this.factors = factors;
    }

    public void addFactor(Factor factor){
        if(factors == null){
            factors = new ArrayList<>();
        }
        factors.add(factor);
    }
    public void addFactors(List<Factor> factors){
        if(this.factors == null){
            this.factors = new ArrayList<>();
        }
        this.factors.addAll(factors);
    }
}
